home *** CD-ROM | disk | FTP | other *** search
/ The National Palace Museum Experience / The National Palace Museum Experience.iso / Programs / Panorama.dxr / 00155_panZoom & panAngle.ls < prev    next >
Encoding:
Text File  |  1998-11-19  |  1.4 KB  |  58 lines

  1. global gqtvrinstance
  2.  
  3. on panzoomin step
  4.   if isqtvrmovie(gqtvrinstance) then
  5.     set tfov to qtvrgetfov(gqtvrinstance)
  6.     if tfov > 20 then
  7.       set tfov to tfov - step
  8.       qtvrsetfov(gqtvrinstance, string(tfov))
  9.       qtvrupdate(gqtvrinstance)
  10.     end if
  11.   end if
  12. end
  13.  
  14. on panzoomout step
  15.   if isqtvrmovie(gqtvrinstance) then
  16.     set tfov to qtvrgetfov(gqtvrinstance)
  17.     if tfov < 58 then
  18.       set tfov to tfov + step
  19.       qtvrsetfov(gqtvrinstance, string(tfov))
  20.       qtvrupdate(gqtvrinstance)
  21.     end if
  22.   end if
  23. end
  24.  
  25. on pantoleft step
  26.   global roomnumber, currectnodeid
  27.   if isqtvrmovie(gqtvrinstance) then
  28.     set panAngle to qtvrgetpanangle(gqtvrinstance)
  29.     repeat while the mouseDown
  30.       set panAngle to panAngle + step
  31.       qtvrsetpanangle(gqtvrinstance, string(panAngle))
  32.       qtvrupdate(gqtvrinstance)
  33.       if (roomnumber = 204) and (currectnodeid = 4) then
  34.         exit
  35.         next repeat
  36.       end if
  37.       mousestilldownhandler()
  38.     end repeat
  39.   end if
  40. end
  41.  
  42. on pantoright step
  43.   global roomnumber, currectnodeid
  44.   if isqtvrmovie(gqtvrinstance) then
  45.     set panAngle to qtvrgetpanangle(gqtvrinstance)
  46.     repeat while the mouseDown
  47.       set panAngle to panAngle - step
  48.       qtvrsetpanangle(gqtvrinstance, string(panAngle))
  49.       qtvrupdate(gqtvrinstance)
  50.       if (roomnumber = 204) and (currectnodeid = 4) then
  51.         exit
  52.         next repeat
  53.       end if
  54.       mousestilldownhandler()
  55.     end repeat
  56.   end if
  57. end
  58.